package com.example.demo.mapper;

import com.example.demo.model.UserInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserInfoMapper {

    @Select("select* from user where user_name=#{username} and delete_flag=0")
    UserInfo selectByName(String username);


    @Select("select* from user where id=#{id}")
    @Options(useGeneratedKeys = true,keyProperty = "id")
    UserInfo selectById(Integer id);

}


